package Work4;

public class Thread_print_number extends Thread{
	public void run() {
		synchronized (PrintDemo.lock) {
			for(int i=1;i<53;i++){
				System.out.print(i);
				if(i%2==0){
					PrintDemo.lock.notify();
					try {
							PrintDemo.lock.wait();
					} catch (InterruptedException e) {
						e.printStackTrace();
					}
				}
				
			}
		}
	}
}
